export function flatten(arr) {
  if (!Array.isArray(arr)) {
    return [arr];
  }
  return arr.reduce((acc, cur) => {
    return [...acc, ...flatten(cur)];
  }, []);
}
